<?php

namespace App\Http\Resources;

class PoolCoinResource extends Resource
{
    /**
     * Transform the resource collection into an array.
     *
     * @param \Illuminate\Http\Request $request
     *
     * @return array
     */
    public function toArray($request)
    {
        return [
            'id' => $this->id,
            'name' => $this->name,
            'img' => $this->img,
            'price' => bcadd($this->price, 0, 2),
            'min' => $this->min,
            'profit' => bcadd($this->profit, 0, 2)
        ];
    }
}
